-- GENERATED SPELL FOR [Rookery Guardian] --


function spell0_10258(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10258', 617, 1)
end

function spell1_10258(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(15572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10258', 30344, 1)
end

function Sorts_10258(pUnit, Event)
local choix_sorts_10258 = math.random(0, 1)
if choix_sorts_10258 == 0 then
pUnit:RegisterEvent('spell0_10258', 1, 1)
end
if choix_sorts_10258 == 1 then
pUnit:RegisterEvent('spell1_10258', 1, 1)
end
end

function mob10258_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10258', math.random(1500, 3000), 1)
end

function mob10258_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10258_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10258_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10258, 1, 'mob10258_Action')
RegisterUnitEvent(10258, 2, 'mob10258_Leave')
RegisterUnitEvent(10258, 3, 'mob10258_Kill')
RegisterUnitEvent(10258, 4, 'mob10258_Die')
